import { Component } from "react";
import {
  Button,
  Cell,
  Empty,
  Avatar,
  Grid,
  Image,
  Tabs,
} from "@nutui/nutui-react-taro";
import styles from "./index.scss";
import { useModel } from "@/store";
import Taro from "@tarojs/taro";
import { useState } from "react";
import { queryTestList } from "@/services/report";
import { useEffect } from "react";
import { formatDate, calculateTime } from "@/utils/repeated";
import Layout from "@/components/Layout";
import InspectList from "./inspect";
import ExamList from "./Exam";
// import { IconFont } from "@nutui/icons-react-taro";
export default () => {
  const { user, getUser } = useModel("user");

  const [tabValue, setTabValue] = useState("0");

  const isEmpty = false;

  const toSelectdep = () => {
    Taro.navigateTo({ url: "/pages/register/selectdep/index" });
  };

  return (
    <Layout title="问诊报告">
      <view className={styles.reportWarp}>
        <Tabs
          value={tabValue}
          onChange={(value) => {
            setTabValue(value);
          }}
          tabStyle={{ background: "#fff" }}
        >
          <Tabs.TabPane className={styles.tabPane} title="检查"></Tabs.TabPane>
          <Tabs.TabPane className={styles.tabPane} title="检验"></Tabs.TabPane>
        </Tabs>

        <view style={{ display: tabValue == "0" ? "block" : "none" }}>
          <InspectList></InspectList>
        </view>
        <view style={{ display: tabValue == "1" ? "block" : "none" }}>
          <ExamList></ExamList>
        </view>
      </view>
    </Layout>
  );
};
